const mysql  = require('mysql2/promise');
const {connection} = require('./common');

//获取数据
async function getAdmin(){
    let sql = 'select * from admin';
    let res = await connection.execute(sql);
    return JSON.stringify(res[0]);
}
module.exports = {
    getAdmin
}